import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';

import 'utils/utils.dart';

class CompletePage extends StatelessWidget {
  const CompletePage({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final width = Utils.screenWidth;
    var left = (Utils.screenWidth - 274) / 2;
    return Container(
      child: SingleChildScrollView(
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Container(
              margin: EdgeInsets.only(left: 14, top: 20, right: 14),
              height: (width - 28) * (297 / 348),
              child: InkWell(
                onTap: null,
                child: Image.asset(
                  'assets/images/please_wait.png',
                ),
              ),
            ),
            Padding(
                padding: EdgeInsets.fromLTRB(left, 22, left, 0),
                child: InkWell(
                  onTap: null,
                  child: Text(
                    "Wheel of Fortune\nis completed",
                    style: TextStyle(
                      color: Color(0xFF041D57),
                      fontSize: 24,
                      fontFamily: 'Avenir Next LT Pro',
                      fontWeight: FontWeight.bold,
                    ),
                  ),
                )),
            Padding(
              padding: EdgeInsets.fromLTRB(left, 40, left, 20),
              child: InkWell(
                onTap: null,
                child: Text(
                  "Please wait for the next activity.",
                  style: TextStyle(
                    color: Color(0xFF041D57),
                    fontSize: 16,
                    fontFamily: 'Avenir Next LT Pro',
                    fontWeight: FontWeight.bold,
                  ),
                ),
              ),
            ),
            Container(
              padding: EdgeInsets.fromLTRB((width - 20 * 2 - 184) / 2, 70,
                  (width - 20 * 2 - 184) / 2, 30),
              child: GestureDetector(
                onTap: () {
                  // Navigator.of(context).pop();
                  Fluttertoast.showToast(msg: 'Go to Homepage',gravity: ToastGravity.CENTER);
                },
                child: Container(
                  height: 34,
                  margin: EdgeInsets.only(top: 20, bottom: 40),
                  decoration: BoxDecoration(
                    color: Color(0xFFFFB32C),
                    borderRadius: BorderRadius.circular(17),
                  ),
                  child: Center(
                    child: Text(
                      'Homepage',
                      style: TextStyle(
                          color: Color(0xFFFFFFFF),
                          fontSize: 14,
                          fontFamily: 'Avenir Next LT Pro',
                          fontWeight: FontWeight.bold),
                    ),
                  ),
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
